<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<script type="text/javascript">
function login(){
	var form1=document.getElementById("loginform1");
	var name=document.getElementById("txt_name")value;
	var pwd =document.getElementById("txt_pwd")value;
	console.log(name);
	if(name=="www"&&pwd=="dd"){
		console.log(1);
		form1.submit();
	}else{
		console.log(2);
		window.open("error.jsp");
	}
}
</script>
<form id="loginform1"action="./result.jsp">
账号：<input id="txt_name1"name="txt_name"type="text"value=""><br>
密码：<input id="txt_pwd1"name="txt_pwd"type="password"value=""><br><br>
&nbsp;<input type="submit"value="登录"onclick="login()"><br>
</form>
</body>
</html>